from typing import Union

my_list:list[Union[int, str]] = [1, 2, "China", "Beijing"]


def func(data: Union[int, str]) -> Union[int, str]:
    pass

func()